﻿using System;
using System.Linq;

namespace Greed
{
    public static class ConsolePrint
    {
        public static void PrintOnPosition(int left, int top, string message)
        {
            Console.SetCursorPosition(left, top);

            Console.Write(message);
        }

        public static void PrintInCenter(string message, int verticalPosition)
        {
            int horisontalPosition = (GreedGame.WindowWidth - message.Length) / 2;

            PrintOnPosition(horisontalPosition, verticalPosition, message);
        }

        public static void PrintWithAlignment(string message, int verticalPosition, int leftAlignment)
        {
            int horisontalPosition = (GreedGame.WindowWidth - leftAlignment) / 2;

            PrintOnPosition(horisontalPosition, verticalPosition, message);
        }
    }
}
